#ifndef INCLUDED_JID_H
#define INCLUDED_JID_H

#include <string>

namespace tinkle {

class Jid {
public:
    Jid();
    Jid(const std::string &jidString);
    Jid(const std::string &node, const std::string &domain,
        const std::string &resource = "");
    // copy constructor
    //Jid(const Jid &jid);
    //Jid & operator = (const Jid &jid);
    ~Jid();
    // a jid may or may not include a resource segment, here a full jid is
    // defined to *have* a resource
    bool operator == (const Jid &other) const;
    bool FullEquals(const Jid &other) const;

    std::string Str() const;

    std::string Node() const;
    void SetNode(const std::string &node);

    std::string Domain() const;
    void SetDomain(const std::string &domain);

    std::string Resource() const;
    void SetResource(const std::string &resource);

private:
    std::string _node;
    std::string _domain;
    std::string _resource;
};

}

#endif